package cate.game.role.show.vehicle;

import cate.common.table.show.row.VehicleSkinLevelRow;
import cate.common.table.show.row.VehicleSkinRow;
import cate.game.GameBody;
import cate.game.role.show.ShowItemBase;
import com.fasterxml.jackson.annotation.JsonIgnore;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("载具皮肤")
public class VehicleSkin extends ShowItemBase {

    @NoteField("等级")
    public int level = 1;

    public VehicleSkin() {}

    public VehicleSkin(int tid, long valiedTime) {
        super(tid, valiedTime);
        this.level = 1;
    }

    public VehicleSkinRow getRow(GameBody game){
       return game.table.blog.vehicle.get(tid);
    }

    @JsonIgnore
    public VehicleSkinLevelRow getLevelRow(GameBody game){
        return game.table.blog.vehicleLevel.getLevelRow(tid, level);
    }
}
